import request from '@/utils/request'

export default {
    getbookListPage(regularQuery) {
        return request({
            url: `/member/books/selectUnApproval`,
            method: 'post',
            data:{
                    "bookId":regularQuery.bookId,
                    "bookName": regularQuery.bookName,
                    "startTime": regularQuery.startTime,
                    "endTime": regularQuery.endTime,
                    "page":regularQuery.page,
                    "limit":regularQuery.limit 
            }

        })
    },
    
    approval(bookId,status) {
        return request({
            url: `/member/books/approval`,
            method: 'post',
            data:{
                    id:bookId,
                    status:status

            }

        })
    },

 getonlinebookListPage(regularQuery) {
    // debugger
    return request({
      url: '/member/books/selectAll',
      method: 'post',
      data: { 
        page: regularQuery.page,
        limit: regularQuery.size
       }
    })
  },
  offThebook(bookId,status) {
    // debugger
    return request({
      url: '/member/books/delete',
      method: 'post',
      data: { 
        id: bookId
       }
    })
  },

  getQueryRegularListPage(regularQuery){
    return request({
        url: '/member/books/selectByNameUnApproval',
        method: 'post',
        data: { 
          "limit": regularQuery.size,
          "page": regularQuery.page,
          "startTime": regularQuery.startTime,
          "endTime" : regularQuery.endTime,
          "bookName": regularQuery.bookName,
         }
      })
  },

  
  getRegularoffListPage(regularQuery){
    return request({
        url: '/member/books/selectAlloff',
        method: 'post',
        data: { 
          "limit": regularQuery.size,
          "page": regularQuery.page,
        
         }
      })
  },
}